<%@ page contentType="text/html;charset=UTF-8" session="false"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
<html>
<head>
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css">
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap-theme.min.css">
<link rel="stylesheet" href="css/starter-template.css">
<script src="//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script>
<link rel='stylesheet' href='vender/redactor/redactor.css'>
<title>BLOG::SEASON2</title>
<script src="vender/jquery/jquery-2.0.3.min.js"></script>
<SCRIPT language='JavaScript' type='text/javascript'>
	function submit() {
		document.blogForm.submit();
		return;
	}
</SCRIPT>
<script type="text/javascript">
	$(document).ready(function() {
		$('#description').redactor({
			imageUpload : '../demo/scripts/image_upload.php',
			fileUpload : '../demo/scripts/file_upload.php',
			imageGetJson : '../demo/json/data.json'
		});
	});
</script>
</head>
<body>
	<nav class="navbar navbar-inverse navbar-fixed-top" role="navigation">
		<div class="container">
			<div class="navbar-header">
				<button type="button" class="navbar-toggle collapsed"
					data-toggle="collapse" data-target=".navbar-collapse">
					<span class="sr-only">Toggle navigation</span> <span
						class="icon-bar"></span> <span class="icon-bar"></span> <span
						class="icon-bar"></span>
				</button>
				<a class="navbar-brand" href="#">BLOG::Season2</a>
			</div>
			<div class="collapse navbar-collapse">
				<ul class="nav navbar-nav">
					<li class="active"><a href="#">Home</a></li>
					<li><a href="<%=request.getContextPath()%>/findBlogs">Blog</a></li>
					<!-- 					<li><a href="#contact">Contact</a></li> -->
				</ul>
			</div>
			<!--/.nav-collapse -->
		</div>
	</nav>
	<div class="container">
		<div align="center">
			<h1>글 수정</h1>
			<form:form modelAttribute="blog" name="blogForm" action="updateBlog"
				role="form">
				<table class="table">
					<tr>
						<td width="50" align="center">
							<div class="form-group">
								<label for="exampleInputEmail1">제목</label>
							</div>
							<div class="form-group">
								<td width="350" align="center"><form:input path="title"
										size="50" class="form-control" /></td>
							</div>
					</tr>
					<tr>
						<td width="50" align="center">
							<div class="form-group">
								<label for="exampleInputEmail1">작성자</label>
							</div>
							<div class="form-group">
								<td width="350" align="center"><form:input path="writer"
										size="50" class="form-control" /></td>
							</div>
					</tr>
					<tr>
						<td width="50" align="center">
							<div class="form-group">
								<label for="exampleInputEmail1">내용</label>
							</div>
							<div class="form-group">
								<td width="350" align="center"><form:textarea
										path="description" rows="10" class="form-control" /></td>
							</div>
					</tr>
				</table>
			</form:form>
			<br> <a href="javascript:submit()" class="btn btn-success">
				저장 </a> &nbsp;&nbsp;&nbsp; <a
				href="<%=request.getContextPath()%>/findBlogs.do"
				class="btn btn-success"> 목록 </a>
		</div>
	</div>
</body>
</html>

